package com.tengju.data.domain.model.report;

import lombok.Getter;

import java.util.Arrays;

@Getter
public enum AchievementBonusStatusEnum {

    WAIT_SETTLE((byte)0,"待结算"),
    /* 已结算 */
    SETTLE((byte)1,"已结算"),

    /* 补贴冻结（降权） */
    FREEZE((byte)2,"已冻结");

    byte status;
    String desc;

    AchievementBonusStatusEnum(byte status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static AchievementBonusStatusEnum parseByStatus(byte status) {
        return Arrays.stream(AchievementBonusStatusEnum.values())
                .filter(k -> k.getStatus() == status)
                .findFirst().orElse(null);
    }

}
